<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML
{
    protected $tempDir = "";
    protected $font = "freesans";
    protected $orientation;
    protected $paperSize;
    private $saveArrayReturnType;
    protected static $paperSizes;
    public function __construct(PHPExcel $phpExcel)
    {
        parent::__construct($phpExcel);
        $this->setUseInlineCss(true);
        $this->tempDir = PHPExcel_Shared_File::sys_get_temp_dir();
    }
    public function getFont()
    {
        return $this->font;
    }
    public function setFont($fontName)
    {
        $this->font = $fontName;
        return $this;
    }
    public function getPaperSize()
    {
        return $this->paperSize;
    }
    public function setPaperSize($pValue = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER)
    {
        $this->paperSize = $pValue;
        return $this;
    }
    public function getOrientation()
    {
        return $this->orientation;
    }
    public function setOrientation($pValue = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT)
    {
        $this->orientation = $pValue;
        return $this;
    }
    public function getTempDir()
    {
        return $this->tempDir;
    }
    public function setTempDir($pValue = "")
    {
        if(is_dir($pValue)) {
            $this->tempDir = $pValue;
            return $this;
        }
        throw new PHPExcel_Writer_Exception("Directory does not exist: " . $pValue);
    }
    protected function prepareForSave($pFilename = NULL)
    {
        $this->phpExcel->garbageCollect();
        $this->saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType();
        PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
        $fileHandle = fopen($pFilename, "w");
        if($fileHandle === false) {
            throw new PHPExcel_Writer_Exception("Could not open file " . $pFilename . " for writing.");
        }
        $this->isPdf = true;
        $this->buildCSS(true);
        return $fileHandle;
    }
    protected function restoreStateAfterSave($fileHandle)
    {
        fclose($fileHandle);
        PHPExcel_Calculation::setArrayReturnType($this->saveArrayReturnType);
    }
}

?>